# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pwnedpasswords
_pkgname=pwnedpasswords
pkgver=3.0.0.r7.ge33d4bb
pkgrel=2
pkgdesc='Generate and verify pwnedpasswords check digits.'
groups=('blackarch' 'blackarch-misc')
arch=('any')
url='https://github.com/lionheart/pwnedpasswords'
license=('Apache')
depends=('python' 'python-future')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/lionheart/$_pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $_pkgname

  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd $_pkgname

  python setup.py build
}

package() {
  cd $_pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.* NOTICE
}

